madhead/tyzenhaus

Bugs found during α

madhead opened this issue · 0 comments

  • /lang shouldn't have any state
  • /expense should check user ids on actions
  • /expense should not allow zeros or empty list of participants
  • Non-participants should not be allowed to create transactions
  • Currencies must be limited to 120-128 chars (current DB limit)
  • There should be a fallback in case the user leves the chat after tracking some transactions
  • When a new user is added to the group AFTER everybody else registered it could break the bot:
    java.util.NoSuchElementException: Collection contains no element matching the predicate.
        at me.madhead.tyzenhaus.core.telegram.updates.expense.DebtsCommandUpdateProcessor$process$debtsMessage$1.invoke(DebtsCommandUpdateProcessor.kt:114) ~[tyzenhaus-core-0.0.1.jar:?]
        at me.madhead.tyzenhaus.core.telegram.updates.expense.DebtsCommandUpdateProcessor$process$debtsMessage$1.invoke(DebtsCommandUpdateProcessor.kt:88) ~[tyzenhaus-core-0.0.1.jar:?]
        at kotlin.text.StringsKt__AppendableKt.appendElement(Appendable.kt:85) ~[kotlin-stdlib-1.5.10.jar:1.5.10-release-890 (1.5.10)]
        at kotlin.collections.CollectionsKt___CollectionsKt.joinTo(_Collections.kt:3344) ~[kotlin-stdlib-1.5.10.jar:1.5.10-release-890 (1.5.10)]
        at kotlin.collections.CollectionsKt___CollectionsKt.joinToString(_Collections.kt:3361) ~[kotlin-stdlib-1.5.10.jar:1.5.10-release-890 (1.5.10)]
        at kotlin.collections.CollectionsKt___CollectionsKt.joinToString$default(_Collections.kt:3360) ~[kotlin-stdlib-1.5.10.jar:1.5.10-release-890 (1.5.10)]
        at me.madhead.tyzenhaus.core.telegram.updates.expense.DebtsCommandUpdateProcessor.process(DebtsCommandUpdateProcessor.kt:85) ~[tyzenhaus-core-0.0.1.jar:?]
        at me.madhead.tyzenhaus.core.telegram.updates.expense.DebtsCommandUpdateProcessor$process$1.invokeSuspend(DebtsCommandUpdateProcessor.kt) ~[tyzenhaus-core-0.0.1.jar:?]
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [kotlin-stdlib-1.5.10.jar:1.5.10-release-890 (1.5.10)]
    
  • confirmation in /expense should have "Cancel" option
  • it shouldn't be allowed to select participants in another user's transaction